﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx.TreeSharp;
using HolySword.Delegates;
using Styx;
using HolySword.Helpers;
using Styx.WoWInternals.WoWObjects;

namespace HolySword.Behaviours
{
    class PreCombat
    {
        private static LocalPlayer Me = HolySword.Me;

        public static Composite DoRetribution(SimpleBooleanDelegate condition)
        {
            return DoHoly(condition);
        }

        public static Composite DoProtection(SimpleBooleanDelegate condition)
        {
            return DoHoly(condition);
        }

        public static Composite DoHoly(SimpleBooleanDelegate condition)
        {
            return
                new PrioritySelector(ctx => condition != null && condition(ctx),
                                     Spell.BuffSelfSpell(Paladin.BlessingofKings, ret => !Me.HasAnyAura(Lists.Alikes_BlessingOfKings), "PreCombat"),
                                     Spell.BuffSelfSpell(Paladin.BlessingofMight, ret => !Me.HasAnyAura(Lists.Alikes_BlessingOfMight), "PreCombat"),
                                     Spell.BuffSelfSpell(Paladin.SealofInsight, ret => !Me.HasMyAura(Paladin.SealofInsight.Id), "PreCombat")
                                     //Spell.BuffSelfSpell(Paladin.RighteousFury, ret => !StyxWoW.Me.HasMyAura(Paladin.RighteousFury.Id), "PreCombat")
                    );
        }
    }
}
